/*
 * spi.h
 *
 * Created: 2012/5/19 21:09:56
 *  Author: albert
 */ 


#ifndef SPI_H_
#define SPI_H_

 #include <avr/io.h>
 #include <avr/interrupt.h>

 #define DDR_SPI DDRB
 #define DD_MISO PB3
 #define DD_MOSI PB2
 #define DD_SCK PB1
 #define DD_SS PB0
 
 #define spi_buff_size 100
 
 void SPI_MasterInit (void);
 void SPI_SlaveInit (void);
 void SPI_MasterTransmit(char data);
 char SPI_SlaveReceive(void);



#endif /* SPI_H_ */